Apparatus and method for calculation of divisions and square roots

ABSTRACT

Non-restoring radix-2 division and square rooting procedures are provided. The proposed procedures utilize a quotient/root digit set {−1, 0, +1} and a quotient/root prediction table (QRT/RPT). The i&#39;th quotient/root digit is determined with reference to a partial remainder from (i−2)&#39;th iterative operation and by the quotient/root prediction table. The present procedures generate the (i−1)&#39;th correction term, which is to be applied in calculating the i&#39;th partial remainder, simultaneously with the (i−2)&#39;th correction term, and need not to perform an iterative operation to obtain the i&#39;th partial remainder.

[0001] This application relies for priority upon Korean Patent Application Serial No. 2001-72685, filed on Nov. 21, 2001, the contents of which are herein incorporated by reference in their entirety.

FIELD OF THE INVENTION

[0002] The present invention is in the field of data processing and, more specifically, relates to an apparatus and method for executing division and square rooting operations at high speed.

BACKGROUND OF THE INVENTION

[0003] With a recent rapid growth in computer application environments that require complex mathematical computations, such as graphic rendering, computer-aided design (CAD), or digital signal processing (DSP), almost all high performance microprocessors may be required to support operations of floating-point addition, multiplication, division, square rooting, etc., on the basis of the IEEE 754-1985 floating-point standard.

[0004] In a typical data processing system, the division and square rooting operations may more infrequently happen than addition or multiplication. However, while addition or multiplication may require about 3 cycles of latency, the division and square rooting operations each may require more than 20 cycles of latency, which will considerably affect overall performance of a system at least from a latency point of view.

[0005] The most common division process is the SRT division process. The SRT is an acronym for Sweeney, Robertson, and Tocher, who proposed processs similarly characterized to those at the same period. The SRT division process enhances the operation speed of non-restoring division by admitting zero (0), as a quotient digit, with which there is no need of conducting addition/subtraction. The principle of the SRT division process can be applied to a square rooting operation. The structure of the SRT process is disclosed in detail in “Computer Arithmetic Algorithms and Hardware Design” of Oxford university Press 2000 by Behrooz Parhami.

[0006] It is easy to implement the traditional radix-2 SRT process in a hardware structure, but a lot of iterations are necessary to obtain quotient/square-roots. To the contrary, the radix-4 SRT process is difficult to reduce to a hardware structure and has a longer delay time for each iterative operation, while it reduces the number of iterations to a half of the radix-2. U.S. Pat. No. 5,258,944 discloses a way of referring a lookup table to select a quotient at each iterative step by means of the radix-4 SRT process.

SUMMARY OF THE INVENTION

[0007] It is, therefore, an object of the present invention to provide an apparatus and method for executing fast operations of division and square rooting by means of a radix-2 arithmetic process.

[0008] The invention provides novel arithmetic processes of non-restoring radix-2 division and/or square rooting operations, which are kinds of modified radix-2 SRT processes and utilize the same quotient/root digit set {−1, 0, +1} as the conventional radix-2 SRT procedures. In particular, a novel quotient/root prediction table (QRT/RPT) is used for the modified radix-2 SRT process according to the present invention. By means of the quotient/root prediction table, the i'th quotient/root digit is determined with reference to the i'th partial remainder obtained from the (i−2)'th partial remainder. The present procedures generate the (i−1)'th correction term, which is to be applied in calculating the i'th partial remainder, simultaneously with the (i−2)'th correction term, and skip an iterative operation to obtain the i'th partial remainder.

[0009] The present radix-2 arithmetic processes reduce the time of iterative operations by a half of the conventional ones, without lengthening a delay time of each iterative operation.

[0010] In accordance with the invention, an apparatus for generating a quotient by dividing a dividend with a divisor is provided. The apparatus includes a first correction term generator for creating a first correction term and a second correction term generator for creating a second correction term. A first subtractor deducts the first correction term from a left-shifted value of an (i−2)'th partial remainder. A second subtractor deducts the second correction term from the left-shifted value of the (i−2)'th partial remainder. A carry propagation detector determines whether there is a borrow while calculating an (i−1)'th partial remainder. Quotient digit prediction means predicts an i'th quotient digit in response to an (i−1)'th quotient digit, the (i−2)'th partial remainder, and an output of the carry propagation detector. Selection means selects an alternative one of outputs of the first and second subtractors as an i'th partial remainder in response to the i'th quotient digit.

[0011] In another aspect, the invention is directed to an apparatus for providing a square root of a radicand by an iterative operation. The apparatus includes a root digit selector for selecting an (i−1)'th root digit from an (i−2)'th partial remainder. A first correction term generator creates a first correction term by means of an (i−2)'th partial square root and the (i−1)'th root digit. A second correction term generator creates a second correction term by means of an (i−1)'th partial square root. A third correction term generator creates a third correction term by means of the (i−1)'th partial square root. A first subtractor deducts the first and second correction terms from a left-shifted value of an (i−2)'th partial remainder. A second subtractor deducts the first and second correction terms from the left-shifted value of the (i−2)'th partial remainder. A carry propagation detector determines whether there is a borrow or a carry-in while calculating (i−1)'th partial remainder. Root digit prediction means predicts an i'th root digit in response to an (i−1)'th root digit, the (i−2)'th partial remainder, and an output of the carry propagation detector. Selection means selects an alternative one of outputs of the first and second subtractors as an i'th partial remainder in response to the i'th root digit.

BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The foregoing and other objects, features and advantages of the invention will be apparent from the more particular description of a preferred embodiment of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the invention.

[0013]FIG. 1 is a functional block diagram of a division/square-root calculation apparatus according to the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

[0014] Now, a preferred embodiment of the invention will be described in conjunction with the FIG. 1.

[0015] I. Radix-2 Division Process Using Quotient Prediction Table (QPT)

[0016] The following is a notation for a floating point binary division process; z dividend z₀.z⁻¹z⁻² . . . z_(−2n) d divider 0.d⁻¹d⁻² . . . d_(−n) q quotient 1.q⁻¹q⁻² . . . q_(−n) X remainder x₀.x⁻¹x⁻² . . . x_(−2n)

[0017] The expression of the remainder x, z−(d*q), is derived from the basic divisional equation z=(d*q)+x. The division process obtains quotient digits in sequence by means of partial remainders (PR).

[0018] The recurrence relation for the radix-2 division is summarized in the Equation 1 as follows:

x ^((i))=2x ^((i−1)) −q _(−i) *d   Equation 1

[0019] In the Equation 1, x^((i)) is the i'th partial remainder, x^((i−1)) is the (i−1)'th partial remainder, q⁻¹ is the i'th quotient digit, d is a divisor, and q_(−i)*d is the i'th correction term. From the Equation 1, the initiative partial remainder is x⁽⁰⁾=z, q_(−i) ∈ {−1, 0, +1}.

[0020] Equation 1 may be reformed with the (i−2)'th partial remainder x^((i−2)), as follows;

x ^((i))=4x ^((i−2))−(2q _(−(i−1)) +q _(−i))*d   Equation 2

[0021] According to Equation 2, the i'th partial remainder x^((i)) results from the (i−1)'th quotient digit q−(i−1) and the divisor d. Therefore, Equation 2 shows that it is omissible for the (i−1)'th iterative operation, which is to obtain the (i−1)'th partial remainder x^((i−1)) necessary for deciding the i'th quotient digit q_(−i), if the i'th quotient digit q_(−i) subordinate to the (i−1)'th quotient digit q_(−(i−1)) is settled therein.

[0022] With the present radix-2 division process employing the quotient digit set {−1. 0, +1}, the i'th quotient digit q_(−i) necessary for obtaining the i'th partial remainder x^((i)) is established as follows by the level-shifted value 2x^((i−1)) of the (i−1)'th partial remainder x^((i−1));

If 2x ^((i−1))<−½, q _(−i)=−1.

If −½≦2x ^((i−1)) , q _(−i)=0.

If 2x ^((i−1))≧½, q _(−i)=+1.

[0023] After defining the (i−1)'th quotient digit q_(−(i−1)), the i'th quotient digit q_(−i) is correctly predicted with reference to the q_((i−1)) without executing an iterative operation for the (i−1)'th partial remainder x^((i−1)). The prediction of the i'th quotient digit q_(−i) uses a quotient prediction table (QPT). When a correction term of the (i−1)'th iteration is generated to calculate the (i−1)'th partial remainder x^((i−1)), the (i−2)'th correction term occurs simultaneously with the (i−1)'th correction terms for q_(−i)=+1 and for q_(−i)=−1. With the (i−2)'th correction term and the (i−1)'th correction terms for q_(−i)=+1 and for q_(−i)=−1, two conditional partial remainders, x1 and x2, are established, and then one of the conditional partial remainders is selected as x^((i)) in accordance with the i'th predicted quotient digit q_(−i).

[0024] Next, described will be a procedure of predicting the i'th quotient digit q⁻¹.

[0025] To predict quotient digits, the divisor d=0.1d⁻²d⁻³d⁻⁴. is considered.

[0026] The i'th quotient digit q⁻¹ prediction case 1: d⁻²=1

If x ^((i−2))<⅛, q _(−(i−1))=0. As −½<2x ^((i−1))<¼, q _(−i)=0.   (1)

If ⅛≦x ^((i−2))<¼, q _(−(i−1))=0. As 2x ^((i−1))≧½, q _(−i)=+1.   (2)

If ¼≦x ^((i−2))<⅜, q _(−(i−1))=+1. q _(−i)=−1 when 2x ^((i−1))<−½ or q _(−i)=0. when −½<x ^((i−1))<¼.   (3)

If ⅜≦x ^((i−2))<½, q _(−(i−1))=+1. As −½≦2x ^((i−1))<½, q _(−i)=0.   (4)

If ½≦x ^((i−2))<⅝, q _(−(i−1))=−1. As −½≦2x ^((i−1))<½, q _(−i)=0.   (5)

If ⅝≦x ^((i−2))<¾, q _(−(i−1))=−1. q _(−i)=0 when −½≦2x ^((i−1))<½ or q _(−i)=−1 when 2x ^((i−1))<−½.   (6)

If ¾≦x ^((i−2))<⅞, q _(−(i−1))=0. As 2x ^((i−2))<−½, q _(−i)=−1.   (7)

If ⅞≦x ^((i−2))<1, q _(−(i−1))=0. As −½≦2x ^((i−1))<½ always, q _(−i)=0.   (8)

[0027] The i'th quotient digit q_(−i) prediction case: d⁻²=0

[0028] As same as the former case of d⁻²=1, it is understood that the value of q_(−i) is predictable with reference to q_(−(i−1)) obtained from each condition.

[0029] From the results, it is possible to make up quotient prediction tables (QPT) for predicting the i'th quotient digit q_(−i) as shown in the following Tables 1 and 2. Table 1 arranges predicted values of the i'th quotient digit q_(−i) in the case of d=0.11d⁻³d⁻⁴ (the q_(−i) prediction case 1 : d⁻²=1), and Table 2 arranges predicted values of the i'th quotient digit q_(−i) in the case of d=0.10d⁻³d⁻⁴ (the q_(−i) prediction case 2 : d⁻²=0). TABLE 1 The q⁻¹ prediction case 1: d⁻² = 1 (i−1)'th (i−1)'th (i−2)'th (i−1)'th partial i'th partial i'th partial quotient remainder quotient remainder quotient remainder digit (borrow = 1) digit (borrow = 0) digit 0.000 0 0.00 0 0.00 0 0.001 0 0.01 +1 0.01 +1 0.010 +1 1.10 −1 1.11 0 0.011 +1 0.11 0 0.00 0 0.100 −1 0.00 0 1.11 0 0.101 −1 0.01 +1 000.0 0 0.110 0 0.10 −1 000.1 −1 0.111 0 0.11 0 001.0 0

[0030] In Table 1, as the divisor d=0.11d⁻³d⁻⁴ . . . when x^((i−2))=0.010x⁻⁴x₅ . . . , the (i−1)'th quotient digit q_(−(i−1)) becomes “+1”. If a borrow occurs (borrow=1) at the calculation step for the (i−1)'th partial remainder x^((i−1)), the i'th quotient digit q_(−i) is set to “−1”. If there is no borrow (borrow=0) at the step for the (i−1)'th partial remainder x^((i−1)), the i'th quotient digit q_(−i) becomes “0”. TABLE 2 The q_(−i) prediction case 2: d⁻² = 0 (i−1)'th (i−1)'th (i−2)'th (i−1)'th partial i'th partial i'th partial quotient remainder quotient remainder quotient remainder digit (borrow = 1) digit (borrow = 0) digit 0.000 0 0.00 0 0.00 0 0.001 0 0.01 +1 0.01 +1 0.010 +1 1.10 +1 1.11 0 0.011 +1 0.11 −1 0.00 0 0.100 −1 0.00 0 1.11 −1 0.101 −1 0.01 0 000.0 0 0.110 0 0.10 −1 000.1 −1 0.111 0 0.11 0 001.0 0

[0031] In Table 2, as the divisor d=0.10d⁻³d⁻⁴ . . . when x^((i−2))=0.110x⁻⁴x⁻⁵ . . . , the (i−1)'th quotient digit q_(−(i−1)) becomes “0”. If a borrow occurs (borrow=1) at the calculation step for the (i−1)'th partial remainder x^((i−1)), the i'th quotient digit q_(−i) is set to “−1”. If there is no borrow (borrow=0) at the step for the (i−1)'th partial remainder x^((i−1)) the i'th quotient digit q−i becomes “0”.

[0032] The following Tables 3 and 4 represent division results by the conventional Radix-2 SRT process and the present Radix-2 SRT process, respectively, in the case of the dividend x=0.01000101 and the divisor d=0.1010. TABLE 3 The conventional non-restoring Radix-2 SRT division process Z 0.01000101 D 0.1010 x⁽⁰⁾ 0.01000101 2x⁽⁰⁾ 0.1000101 ≧½, so set q⁻¹ = +1 +(−d) 1.0110 x⁽¹⁾ 1.1110101 [−½,½], so set q⁻² = 0 2x⁽¹⁾ 1.110101 x⁽²⁾ = 2x⁽¹⁾ 1.110101 2x⁽²⁾ 1.10101 <−½, so set q⁻³ = −1 +(d) 0.1010 x⁽³⁾ 0.10001 2x⁽³⁾ 0.1001 ≧½, so set q⁻⁴ = +1 +(−d) 1.0110 X⁽⁴⁾ − 2x⁽³⁾ 1.1111 Negative, so add to correct +d 0.1010 x⁽⁴⁾ 0.1001 x 0.00001001 q 0.10−11 Uncorrected BSD quotient q 0.0110 Covert and subtract ulp

[0033] TABLE 4 The present non-restoring Radix-2 division process Z 0.01000101 D 0.1010 x⁽⁰⁾ 0.01000101 4x⁽⁰⁾ 0.000101 ≧½, so set q⁻¹ = +1, −(2d) 1.010 so set q⁻² = 0 X⁽¹⁾ 1.110101 <−½, so set q⁻³ = −1, 4x⁽¹⁾ 1.110101 so set q⁻⁴ = +1 +d X⁽²⁾ 1.1111 Negative, so add to correct +(d) 1.10101 +(−d) 0.1010 X⁽⁴⁾ 0.1001 x 0.00001001 q 0.10−11 Uncorrected BSD quotient q 0.0110 Covert and subtract ulp

[0034] As shown in Table 4, the proposed process calculates the first quotient digit q⁻¹ from the initiative partial remainder x⁽⁰⁾ in the first iterative operation, and then the quotient prediction table predicts the second quotient digit q⁻² with reference to the calculated q⁻¹ (refer that the conventional one obtains the q⁻² from the second iterative operation). Thereafter, the quotient digits q⁻¹ and q⁻² are applied to a calculating operation for the first partial remainder x⁽¹⁾. In the second iterative operation, the second quotient digit q⁻³ is obtained from x⁽¹⁾ and then the quotient prediction table defines the fourth quotient digit q⁻⁴ with reference to the settled q⁻³ (refer that the convention q⁻⁴ is obtained in the fourth iterative operation). Thereafter, the second partial remainder x⁽²⁾ is established from the digits q⁻³ and q⁻⁴. As a result, since the proposed Radix-2 division process needs not performing the iterative operations for the first and third partial remainders, x⁽¹⁾ and x⁽³⁾, it shortens the latency by a half of the conventional case. Additionally, the present process completes the whole division operation sooner than the conventional process does because each execution time of the iterative operations is the same with the conventional.

[0035] II. Radix-2 Square-Rooting Arithmetic Process Using a Root Prediction Table (RPT)

[0036] The following is a notation of the present floating point binary square-rooting process; z radicand z₁z₀.z⁻¹z⁻² . . . z_(−n) (1 ≦ z < 4) q square root 1.q⁻¹q⁻² . . . q_(−n) (1 ≦ q < 2) X remainder x₁x₀.x⁻¹x⁻² . . . x_(−n) (0 ≦ x < 4)

[0037] The basic equation for the square-rooting operation is z=q²+x. The SRT square-rooting operation process is to obtain the root digits q⁻¹q⁻² . . . q_(−n) with the partial remainders.

[0038] The following is the circular equation for the Radix-2 square-rooting operation;

x ^((i))=2x ^((i−1))−(2q ^((i−1)) +q _(−i)2^(−i))q ^(−i)   Equation 3

[0039] In Equation 3, x^((i)) and x^((i−1)) represent the i'th and (i−1)'th partial remainders, respectively, q_(−i) is the i'th root digit, and q^((i−1)) is the (i−1)'th partial square root. The initiative partial remainder x⁽⁰⁾=z−1, and q_(−i)∈{−1, 0, +1}.

[0040] Equation 3 may be converted into the following form for the (i−2)'th iterative operation;

x ^((i))=4x ^((i−2))−2(2q ^((i−2)+) q _(−(i−1))2^(−i+1))q _(−(i−1))−2(2q ^((i−1)) +q _(−i)2^(−i))q _(−i)   Equation 4

[0041] In Equation 4, x^((i−2)) is the (i−2)'th partial remainder, q^((i−2)) is the (i−2)'th partial square root, and q_(−(i−1)) is the (i−1)'th root digit.

[0042] Equation 4 may also be summarized into the following form by substituting the term 2q^((i−2))+q_((i−1))2^(−i+1) with C^((i−2)), and 2q^((i−1))+q_(−i)2^(−i) with C^((i−1));

x ^((i))=4x ^((i−1))−2C ^((i−2)) q _(−(i−1))−2C ^((i−1)) q _(−i)   Equation 5

[0043] That is, C^((i−2)) represents the (i−2)'th correction term, and C^((i−1)) is the i'th iterative correction term.

[0044] The square-rooting operation, as the division operation, selects a root digit by a partial remainder in each iterative operation, and obtains the next partial remainder by generating a correction term.

[0045] The proposed Radix-2 square-rooting process, as the present Radix-2 division process aforementioned, uses the set {−1, 0, +1} as a root digit set. The i'th root digit q_(−i) is established by the (i−1)'th partial remainder x^((i−1)), as follows:

If x ^((i−1))<−½, q _(−i)=−1.

If −½≦x ^((i−1))<½, q _(−i)=0.

If x ^((i−1))≧½, q _(−i)=+1.

[0046] The present process predicts the i'th root digit q_(−i) with reference to four bits of the (i−2)'th partial remainder x^((i−2)). Simultaneously with generation of the (i−2)'th correction term C^((i−2)), the (i−1)'th correction term C^((i−1)) is generated to calculate the i'th partial remainder. While generating the (i−1)'th correction term C^((i−1)), correction terms for the case of the i'th root digit q⁻¹=+1 and −1 are preliminarily prepared. Two conditional partial remainders, x1 and x2, are calculated from the (i−1)'th root digit q_(−(i−1)), the i'th root digit q_(−i), the (i−2)'th correction term C^((i−2)), and the correction terms for the case of the i'th root digit q_(−i)=+1 and −1. And, one of the conditional partial remainders, x1 or x2, is selected as x^((i)) in accordance with the i'th root digit q_(−i) settled finally.

[0047] Such a process in the proposed Radix-2 square-rooting process makes it possible to skip an iterative operation for the (i−1)'th partial remainder x^((i−1)). It shortens an iterative operation time by a half of the conventional Radix-2 SRT square-rooting process, and does not lengthen a delay time of each iterative operation, different from the conventional.

[0048] The prediction of root digits proceeds according to the following conditions, assuming that the radicand z=z₂z₁z₀.z⁻¹z⁻² . . . and the partial remainder x^((i))=x₂x₁x₀.x⁻¹x⁻² . . .

[0049] The i'th Root Digit Prediction Case 1: z⁻¹=0 and x₂=0

[0050] Under the initiative condition in which q_(−(i−1)) is always 1 when z⁻¹ ⁼⁰ and x₂=0,

If 0≦x ^((i−2))<1, x ^((i−1))<−½. Thus, q⁻¹=−1.   (1)

If 1≦x ^((i−2))<5/4 and x ^((i−1))<−½, q _(−i)=−1. If 1≦x ^((i−2))<5/4 and −½<x ^((i−1))<½, q ⁻¹=0.   (2)

If 5/4≦x ^((i−2))<3/2 and −½≦x ^((i−1))<½, q ⁻¹=0. If 5/4≦x^((i−2))<3/2 and x ^((i−1))≧½, q _(−i)=+1.   (3)

If 3/2≦x ^((i−2))<3, x ^((i−1))≧½. Thus, q⁻¹=+1.   (4)

If 3≦x ^((i−2))<13/4 and x ^((i−1))<−½, q ⁻¹=−1. If 3≦x ^((i−2))<13/4 and x ^((i−1))≧½, q ⁻¹=+1.   (5)

If x ^((i−2))≧13/4, x ^((i−1))<−½. Thus, q_(−i)=−1.   (6)

[0051] The i'th root digit q_(−i) prediction case 2: z⁻¹=0 and x₂=1

[0052] The q_(−(i−1)) is always −1 when z⁻¹=0 and x₂1. Under the initiative condition, it can be understood that the values of the root digits are obtained in the conditions the same with the former q⁻¹ prediction case 1: z⁻¹=0 and x₂=0.

[0053] From the above results, it is possible to make up root prediction tables (RPT) for predicting the i'th root digit q_(−i) as shown in the following Tables 5 and 6. Table 5 shows predicted values of the i'th root digit q_(−i) in the case of the radicand z=z₂z₁z₀.0z⁻² . . . and the partial remainder x^((i))=0x₁x₀.x⁻¹x⁻² . . . (the q⁻¹ prediction case 1: z⁻¹=0 and x₂=0), and Table 6 arranges predicted values of the i'th root digit q_(−i) in the case of the radicand z=z₂z₁z₀.0z⁻² . . . and the partial remainder x^((i))=1x₁x₀.x⁻¹x⁻² . . . (the q_(−i) prediction case 2: z⁻¹=0 and x₂=1). TABLE 5 The q⁻¹ prediction case 1: z⁻¹ = 0 and x₂ = 0 (i−1)'th root digit = +1 (i−1)'th root digit = −1 (i−1)'th (i−1)'th (i−1)'th (i−1)'th partial partial partial partial (i−2)'th rmd. i'th rmd. i'th (i−2)'th rmd. i'th rmd. i'th partial (borrow = root (borrow = root partial (carry-in = root (carry-in = root rmd. 1) digit 0) digit rmd. 1) digit 0) digit 00.00 101.1 −1 110.0 −1 00.00 010.1 +1 010.0 +1 00.01 110.0 −1 110.1 −1 00.01 011.0 +1 010.1 +1 00.10 110.1 −1 111.0 −1 00.10 011.1 +1 011.0 +1 00.11 111.0 −1 111.1 −1 00.11 100.0 −1 011.1 +1 01.00 111.1 −1 000.0 0 01.00 100.1 −1 100.0 −1 01.01 000.0 0 000.1 +1 01.01 101.0 −1 100.1 −1 01.10 000.1 +1 001.0 +1 01.10 101.1 −1 101.0 −1 01.11 001.0 +1 001.1 +1 01.11 110.1 −1 101.1 −1 10.00 001.1 +1 010.0 +1 10.00 110.1 −1 110.0 −1 10.01 010.0 +1 010.1 +1 10.01 111.0 −1 110.1 −1 10.10 010.1 +1 011.0 +1 10.10 111.1 −1 111.0 −1 10.11 011.0 +1 011.1 +1 10.11 000.0 0 111.1 −1 11.00 011.1 +1 100.0 −1 11.00 000.1 −1 000.0 0 11.01 100.0 −1 100.1 −1 11.01 001.0 +1 000.1 +1 11.10 100.1 −1 101.0 −1 11.10 001.1 +1 001.0 +1 11.11 101.0 −1 101.1 −1 11.11 010.0 +1 001.1 +1

[0054] In Table 5, the (i−1)'th root digit q_(−(i−1)) becomes “+1” or “−1” when the (i−2)'th partial remainder x^((i−2))=000.10x⁻³x⁻⁴ . . . When the (i−1)'th root digit q_(−(i−1))=+1, the i'th root digit q_(−i) is “−1” if a borrow occurs while calculating the (i−1)'th partial remainder x^((i−1)) (borrow=1). At this time, although there is no borrow while calculating the (i−1)'th partial remainder x^((i−1)) (borrow=0), the i'th root digit q_(−i) will also be “−1”. When the (i−2)'th partial remainder x^((i−2))=010.11x⁻³x⁻⁴ and the (i−1)'th root digit q_(−(i−1))=−1, the i'th root digit q_(−i) is “0” if a carry-in occurs while calculating the (i−1)'th partial remainder x^((i−1)) (carry-in =1). At this time, although there is no carry-in while calculating the (i−1)'th partial remainder x^((i−1)) (carry-in=0), the i'th root digit q⁻¹ becomes “−1”. TABLE 6 The q⁻¹ prediction case 2: z⁻¹ = 0 and x₂ = 1 (i−1)'th root digit = +1 (i−1)'th root digit = −1 (i−1)'th (i−1)'th (i−1)'th (i−1)'th (i−2)'th partial i'th partial i'th (i−2)'th partial i'th partial i'th partial rmd. root rmd. root partial rmd. root rmd. root rmd. (borrow = 1) digit (borrow = 0) digit rmd. (carry-in = 1) digit (carry-in = 0) digit 00.00 101.0 −1 101.1 −1 00.00 011.1 +1 010.1 +1 00.01 110.1 −1 110.0 −1 00.01 011.0 +1 011.0 +1 00.10 110.0 −1 110.1 −1 00.10 011.1 −1 011.1 −1 00.11 110.1 −1 111.0 −1 00.11 100.0 −1 100.0 −1 01.00 111.0 −1 111.1 −1 01.00 100.1 −1 100.1 −1 01.01 111.1 0 000.0 0 01.01 101.0 −1 101.0 −1 01.10 000.0 +1 000.1 +1 01.10 101.1 −1 101.1 −1 01.11 000.1 +1 001.0 +1 01.11 110.0 −1 110.0 −1 10.00 001.0 +1 001.1 +1 10.00 110.1 −1 110.1 −1 10.01 001.1 +1 010.0 +1 10.01 111.0 −1 111.0 −1 10.10 010.0 +1 010.1 +1 10.10 111.1 0 111.1 −1 10.11 010.1 +1 011.0 +1 10.11 000.0 +1 000.0 0 11.00 011.0 +1 011.1 +1 11.00 000.1 +1 000.1 +1 11.01 011.1 +1 100.0 −1 11.01 001.0 +1 001.0 +1 11.10 100.0 −1 100.1 −1 11.10 001.1 +1 001.1 +1 11.11 101.1 −1 101.0 −1 11.11 010.0 +1 010.0 +1

[0055] From Table 6, the (i−1)'th root digit q_(−(i−1)) becomes “+1” or “−1” when the (i−2)'th partial remainder x^((i−2))=101.01x⁻³x⁻⁴ . . . When the (i−1)'th root digit q_(−(i−1))=+1, the i'th root digit q_(−i) is “−1” if a borrow occurs while calculating the (i−1)'th partial remainder x^((i−1)) (borrow=1). If there is no borrow while calculating the (i−1)'th partial remainder x^((i−1)) (borrow=0), the i'th root digit q_(−i) will be “0”. When the (i−2)'th partial remainder x^((i−2))=110.11x⁻³x⁻⁴ and the (i−1)'th root digit q_(−(i−1))=−1, the i'th root digit q_(−i) is “0” if a carry-in occurs while calculating the (i−1)'th partial remainder x^((i−1)) (carry-in =1). If there is no carry-in while calculating the (i−1)'th partial remainder x^((i−1)) (carry-in=0), the i'th root digit q⁻¹ becomes “0”.

[0056] The following Tables 7 and 8 represent operation results from the conventional Radix-2 SRT square-rooting process and the present Radix-2 SRT square-rooting process, respectively, in the case of the radicand z=01.110110. TABLE 7 The conventional non-restoring Radix-2 square-rooting process Z 01.110110 x⁽⁰⁾ = z − 1 000.110110 q₀ = +1 q⁽⁰⁾ = 1. 2x⁽⁰⁾ 001.101100 q⁻¹ = +1 q⁽¹⁾ = 1.1 −(2 * (1.) + 2⁻¹) 10.1 x⁽¹⁾ 111.001100 q⁻² = −1 q⁽²⁾ = 1.01 2x⁽¹⁾ 110.01100 +(2 * (1.1) + 2⁻²) 10.11 x⁽²⁾ 001.001000 q⁻³ = +1 q⁽³⁾ = 1.011 2x⁽²⁾ 010.010000 −(2 * (1.01) + 2⁻³) 10.101 x⁽³⁾ 111.101000 q⁻⁴ = −1 q⁽⁴⁾ = 1.0101 2x⁽³⁾ 111.010000 +(2 * (1.011) − 2⁻⁴) 10.1011 x⁽⁴⁾ 001.111100 q⁻⁵ = +1 q⁽⁵⁾ = 1.01011 2x⁽⁴⁾ 011.111000 −(2 * (1.0101) − 2⁻⁵) 10.10101 x⁽⁵⁾ 001.001110 q⁻⁶ = +1 q⁽⁶⁾ = 1.010111 2x⁽⁵⁾ 010.011100 −(2 * (1.01011) − 2⁻⁶) 10.101101 X⁽⁶⁾ 111.101111 Negative; Correct +(2 * (1.01011) − 2⁻⁶) 10.101101 X⁽⁶⁾ corrected 010.011100

[0057] TABLE 8 The present non-restoring Radix-2 square-rooting process Z 01.110110 X⁽⁰⁾ = z − 1 000.110110 q₀ = +1 q⁽⁰⁾ = 1. 4x⁽⁰⁾ 011.011000 q⁻¹ = +1 q⁽¹⁾ = 1.1 −(2 * (1.) + 2⁻¹) + +101.11 q⁻² = −1 q⁽²⁾ = 1.01 (2 * (1.1) − 2⁻²) X⁽¹⁾ 001.001000 q⁻³ = +1 q⁽³⁾ = 1.011 4x⁽¹⁾ 100.100000 q⁻⁴ = −1 q⁽⁴⁾ = 1.0101 −(2*(1.01) + 2⁻³) + +101.0111 (2*(1.011) − 2⁻⁴) x⁽²⁾ 111.101000 q⁻⁵ = +1 q⁽⁵⁾ = 1.01011 4x⁽²⁾ 111.110000 q⁻⁶ = +1 q⁽⁶⁾ = 1.010111 +(2*(1.0101) -2⁻⁵) + 10.1011 (2*(01011) − 2⁻⁶) 001.111100 x⁽³⁾ +(2*(1.01011) − 2⁻⁶) 10.101101 x⁽⁶⁾ corrected 010.011100

[0058] The conventional Radix-2 SRT square-rooting arithmetic process, as shown in Table 7, determines each root digit in accordance with the relation with the partial remainders during each iterative operation, and then the settled root digit is put into the calculating process for the next partial remainder. Therefore, the conventional process needs a plurality of iterative operation cycles with the same number of that of the floating-point digits (whole bits+fraction bits).

[0059] On the other hand, in the proposed square-rooting arithmetic process, as shown in Table 8, the root digits q₀ and q⁻¹ are obtained from the initiative partial remainder x⁽⁰⁾ and the root digit prediction table (RPT) establishes q⁻² with reference to the q₀ and q⁻¹ (consider that the conventional gets the q⁻² in the second iterative operation). And then, the first partial remainder x⁽¹⁾ arises from q₀, q⁻¹, and q⁻². In the second iterative operation, x⁽¹⁾ produces q⁻³ that is referred by the root prediction table RPT to settle q⁻⁴ (consider that the conventional gets the q⁻⁴ in the fourth iterative operation). Next, the second partial remainder x⁽²⁾ is generated by means of the digits q⁻³ and q⁻⁴. In the third iterative operation, x⁽²⁾ produces q⁻⁵ that is referred by the root prediction table RPT to settle q⁻⁶ (consider that the conventional gets the q⁻⁶ in the sixth iterative operation). Next, the second partial remainder x⁽³⁾ is generated by means of the digits q⁻⁵ and q⁻⁶.

[0060] As stated above, the present Radix-2 square-rooting arithmetic process can proceed without executing the iterative operation steps for obtaining the first, the third, and the partial remainders, x⁽¹⁾, x⁽³⁾, and x⁽⁵⁾, in order. Therefore, the latency of the present process downs to a half of the conventional. More considering the processing time of the present is the same with that of the conventional, the square-rooting operation of the invention can be conductive faster than the conventional case.

[0061]FIG. 1 contains a block diagram of a division/square-rooting arithmetic apparatus 1 in accordance with an embodiment of the invention. The apparatus includes a controller 10, a divisor register 12, quotient/root registers 14, 20, and 46, remainder registers 16 and 48, quotient/root digit selector 18, multiplexers 22, 24, 36, and 44, correction term generators 26, 28, and 30, subtractors 32 and 34, a carry propagation detector 38, and quotient/root digit prediction blocks 40 and 42.

[0062] The controller 10 supplies clock signals CLKs and control signals to conduct division and square-rooting operations. The divisor register 12 stores the divisor d for the division operation. The register 14 stores the (i−2)'th quotient digit q_(−(i−2)) or the (i−2)'th partial square root q^(−(i−2)) containing the (i−2)'th root digit q_(−(i−2)). The register 16 stores the (i−2)'th partial remainder x^((i−2). The quotient/root digit selector 18 designates the (i−1)'th quotient digit q_(−(i−1)) by means of the (i−2)'th partial remainder x^((i−2)). The register 20 stores the (i−1)'th quotient digit q_(−(i−1)) or the (i−1)'th partial square root q^(−(i−1)) containing the (i−1)'th root digit q_(−(i−1)).

[0063] The multiplexer 22 applies an alternative one of the contents of the divisor register 12 and the quotient/root register 14, i.e., the divisor d and the quotient digit q_(−(i−2)) or the (i−2)'th partial square root q^(−(i−2)) containing the (i−2)'th root digit q_(−(i−2)), to the correction term generator 26. The multiplexer 24 provides an alternative one of the contents of the divisor register 12 and the quotient/root register 20, i.e., the divisor d and the quotient digit q_(−(i−1)) or the (i−1)'th partial square root q^(−(i−1)) containing the (i−1)'th root digit q_(−(i−1)), to the correction term generators 28 and 30. The multiplexers 22 and 24 apply the divisor d to the correction term generators 26, 28, and 30 from the divisor register 12 during the division. While, during the square-rooting operation, the multiplexer 22 applies the (i−2)'th partial square root q^(−(i−2)) to the correction term generator 26, and the multiplexer 24 applies the (i−1)'th partial square root q^(−(i−1)) to the correction term generators 28 and 30.

[0064] The correction term generator 26 creates the (i−2)'th correction term, while the correction term generators 28 and 30 create the (i−1)'th correction terms. In particular, the correction term generator 28 forms the (i−1)'th correction term in the condition of the i'th quotient/root digit q⁻¹=1, while the correction term generator 30 forms the (i−1)'th correction term in the condition of the i'th quotient/root digit q⁻¹=−1. All the correction term generators 26, 28, and 30 make their corresponding correction terms simultaneously. An output of the correction term generator 26 is applied to both the subtractors 32 and 34, and outputs of the correction term generators 28 and 30 are applied to the subtractors 32 and 34, respectively.

[0065] The subtractors 32 and 34 receive the contents of the register 16, i.e., x^((i−2)). The subtractor 32 deducts the output of the correction term generator 26 and/or the output of the correction term generator 28 from the level-shifted value of the (i−2)'th partial remainder x^((i−2)), 4x^((i−2)). Similarly, the subtractor 34 deducts the output of the correction term generator 26 and/or the output of the correction term generator 30 from the level-shifted value of the (i−2)'th partial remainder x^((i−2)), 4x^((i−2)). The subtractor 32 deducts the output of the correction term generator 28 from the level-shifted value of the (i−2)'th partial remainder x^((i−2)), 4x^((i−2)) during the division and deducts the outputs of the correction term generators 26 and 28 from the level-shifted value of the (i−2)'th partial remainder x^((i−2)), 4x^((i−2)) during the square-rooting. The subtractor 34 deducts the output of the correction term generator 30 from the level-shifted value of the (i−2)'th partial remainder x^((i−2)), 4x^((i−2)) during the division and deducts the outputs of the correction term generators 26 and 30 from the level-shifted value of the (i−2)'th partial remainder x^((i−2)), 4 x^((i−2)) during the square-rooting. The outputs from the subtractors 32 and 34 are applied to the multiplexer 36.

[0066] The carry propagation detector 38 determines whether there is a borrow or a carry-in during the calculation step for the (i−1)'th partial remainder x^((i−1)) from the (i−2)'th correction term. Techniques for detecting whether a carry at a given bit position has been generated, propagated, or annihilated (or absorbed) are known.

[0067] The quotient/root digit prediction block 40 contains the i'th quotient/root digits when the borrow or the carry-in occurs as shown in Tables 1, 2, 5, and 6 (i.e., borrow/carry-in=1). The quotient/root digit prediction block 42 contains the i'th quotient/root digits when the borrow or the carry-in does not occur as shown in Tables 1, 2, 5, and 6 (i.e., borrow/carry-in=−1). The quotient/root digit prediction blocks 40 and 42 receive the contents of the registers 16 and 20, i.e., x^((i−2)) and q_(−(i−1)).

[0068] The quotient/root digit prediction block 40 predicts the i'th conditional quotient/root digit q1 (i.e., the i'th quotient/root digit in the case of borrow/carry-in=1) corresponding to the content of the register 16, i.e., x^((i−2)), and the content of the register 20, i.e., q_(−(i−1)). The quotient/root digit prediction block 42 predicts the i'th conditional quotient/root digit q2 (i.e., the i'th quotient/root digit in the case of borrow/carry-in=0) corresponding to the content of the register 16, i.e., x^((i−2)), and the content of the register 20, i.e., q_(−(i−1)).

[0069] Outputs of the quotient/root digit prediction blocks 40 and 42, q1 and q2, are applied to the multiplexer 44. The multiplexer 44 selects an alternative one of the outputs q1 and q2 as the i'th quotient/root digit q_(−i) in response to the output of the carry propagation detector 38.

[0070] The i'th quotient/root digit q_(−i) is stored in the register 46, simultaneously being applied to the multiplexer 36. The multiplexer 36 selects an alternative one of the outputs of the subtractors, q1 and q2, as the (i−1)'th partial remainder x^((i)) in response to i'th quotient/root digit q⁻¹, which is stored in the register 48.

[0071] As described above, the present Radix-2 arithmetic process does not need iterative operation steps for obtaining the (i−1)'th partial remainder because the (i−1)'th correction term necessary to the calculation of the (i−1)'th partial remainder is generated with the (i−2)'th correction term simultaneously. Hence, the overall iterative operation time is reduced to a half of the convention case, and its delay times do not lengthen thereof. Moreover, the proposed arithmetic apparatus shares the correction term generators and the functional blocks for calculating the division and square-rooting operations, rendering a small area overhead for itself.

[0072] While this invention has been particularly shown and described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. 

What is claimed is:
 1. An apparatus generating a quotient by dividing a dividend with a divisor, the apparatus comprising: a first correction term generator for creating a first correction term; a second correction term generator for creating a second correction term; a first subtractor for deducting the first correction term from a left-shifted value of an (i−2)'th partial remainder; a second subtractor for deducting the second correction term from the left-shifted value of the (i−2)'th partial remainder; a carry propagation detector for determining whether there is a borrow while calculating an (i−1)'th partial remainder; quotient digit prediction means for predicting an i'th quotient digit in response to an (i−1)'th quotient digit, the (i−2)'th partial remainder, and an output of the carry propagation detector; and selection means for selecting an alternative one of outputs of the first and second subtractors as an i'th partial remainder in response to the i'th quotient digit.
 2. The apparatus according to claim 1, wherein the first correction term is a conditional correction term when the i'th quotient digit is +1, and the second correction term is a conditional correction term when the i'th quotient digit is −1.
 3. The apparatus according to claim 1, wherein the quotient digit prediction means comprises: a first quotient prediction block for predicting a first quotient digit in response to the (i−1)'th quotient digit and the (i−2)'th partial remainder; a second quotient prediction block for predicting a second quotient digit in response to the (i−1)'th quotient digit and the (i−2)'th partial remainder; and a multiplexer for selecting an alternative one of the first and second quotient digits as the i'th quotient digit in response to the output of the carry propagation detector.
 4. The apparatus according to claim 3, wherein the first quotient digit is a conditional quotient digit at a presence of a borrow, and the second quotient digit is a conditional quotient digit at an absence of a borrow.
 5. The apparatus according to claim 1, wherein the apparatus is associated with a floating point.
 6. An apparatus generating a quotient (q) by dividing a dividend (x) with a divisor (d), the apparatus comprising: an iterative division circuit for operating a partial remainder involved in x^((i))=4x^((i−2))−(2q_(−(i−1))+q_(−i))*d, where x^((i)) is an i'th partial remainder, x^((i−2)) is an (i−2)'th partial remainder, q_(−(i−1)) is an (i−1)'th quotient digit, x⁽⁰⁾=x, and q⁻¹ ∈ {−1, 0, +1}; a quotient digit selector for selecting the (i−1)'th quotient digit from the (i−2)'th partial remainder; a carry propagation detector for checking a presence of a borrow while calculating an (i−1)'th partial remainder; and a quotient digit prediction block for predicting an i'th quotient digit in response to the (i−1)'th quotient digit, the (i−2)'th partial remainder, and an output of the carry propagation detector.
 7. The apparatus according to claim 6, further comprising a circuit for calculating the i'th partial remainder by means of the (i−2)'th partial remainder, the (i−1)'th quotient digit, and the predicted quotient digit.
 8. The apparatus according to claim 6, wherein the apparatus is associated with a floating point.
 9. The apparatus according to claim 6, further comprising a storage circuit for storing the (i−1)'th quotient digit, the (i−2)'th partial remainder, the i'th quotient digit, and the i'th partial remainder.
 10. A method of providing a quotient (q) by dividing a dividend (x) with a divisor (d), using an iterative operation for a partial remainder represented by x^((i))=4x^((i−2))−(2q_(−(i−1))+q_(−i))*d, where x^((i)) is an i'th partial remainder, x^((i−1)) is an (i−2)'th partial remainder, q_(−(i−1)) is an (i−1)'th quotient digit, x⁽⁰⁾=x, and q_(−i) ∈ {−1, 0, +1}, the method comprising the steps of; selecting the (i−1)'th quotient digit q_(−(i−1)) from the (i−2)'th partial remainder x^((i−2)); detecting a presence of a borrow while calculating an (i−1)'th partial remainder; predicting an i'th quotient digit with reference to the (i−1)'th quotient digit, the (i−2)'th partial remainder, and the a presence of the borrow, without calculating the (i−1)'th partial remainder, and calculating the i'th partial remainder by means of the i'th quotient digit; and repeating the former steps to calculate the quotient (q).
 11. An apparatus providing a square root of a radicand by a iterative operation: a root digit selector for selecting an (i−1)'th root digit from an (i−2)'th partial remainder; a first correction term generator for creating a first correction term by means of an (i−2)'th partial square root and the (i−1)'th root digit; a second correction term generator for creating a second correction term by means of an (i−1)'th partial square root; a third correction term generator for creating a third correction term by means of the (i−1)'th partial square root; a first subtractor for deducting the first and second correction terms from a left-shifted value of an (i−2)'th partial remainder; a second subtractor for deducting the first and second correction terms from the left-shifted value of the (i−2)'th partial remainder; a carry propagation detector for determining whether there is a borrow or a carry-in while calculating an (i−1)'th partial remainder; root digit prediction means for predicting an i'th root digit in response to an (i−1)'th root digit, the (i−2)'th partial remainder, and an output of the carry propagation detector; and selection means for selecting an alternative one of outputs of the first and second subtractors as an i'th partial remainder in response to the i'th root digit.
 12. The apparatus according to claim 11, wherein the second correction term is a conditional correction term when the i'th root digit is +1, and the third correction term is a conditional correction term when the i'th root digit is −1.
 13. The apparatus according to claim 11, wherein the root digit prediction means comprises: a first root prediction block for predicting a first root digit in response to the (i−1)'th root digit and the (i−2)'th partial remainder; a second root prediction block for predicting a second root digit in response to the (i−1)'th root digit and the (i−2)'th partial remainder; and a multiplexer for selecting an alternative one of the first and second root digits as the i'th root digit in response to the output of the carry propagation detector.
 14. The apparatus according to claim 11, further comprising a storage circuit for storing the (i−1)'th root digit, the (i−2)'th partial remainder, the i'th root digit, and the i'th partial remainder.
 15. The apparatus according to claim 11, further comprising a storage circuit for storing the (i−2)'th partial remainder, the (i−2)'th partial square root, the (i−1)'th partial square root, and the i'th partial square root.
 16. An apparatus operating a square root, the apparatus comprising: an iterative square-rooting circuit for operating a partial remainder involved in x^((i))=4x^((i−2))−(2q^((i−2))+q_(−(i−1))2^(−i+1))q_(−(i−1))−2(2q^((i−1))+q_(−i), where x^((i)) is an i'th partial remainder, x^((i−1)) is an (i−1)'th partial remainder, x^((i−2)) is an (i−2)'th partial remainder, q_(−i) is an i'th root digit, q_(−(i−1)) is an (i−1)'th root digit, q^((i−1)) is an (i−1)'th partial square root, q^((i−2)) is an (i−2)'th partial square root, x⁽⁰⁾=z−1, and q_(−i) ∈ {−1, 0, +1}; a root digit selector for selecting the (i−1)'th root digit from the (i−2)'th partial remainder; a carry propagation detector for checking a presence of a borrow or a carry-in while calculating an (i−1)'th partial remainder; and a root digit prediction block for predicting an i'th root digit in response to the (i−1)'th root digit, the (i−2)'th partial remainder, and an output of the carry propagation detector.
 17. The apparatus according to claim 16, further comprising a storage circuit for storing the (i−2)'th partial remainder, the i'th partial remainder, the (i−2)'th partial square root, and an i'th partial square root.
 18. The apparatus according to claim 16, wherein the apparatus is associated with a floating point.
 19. The apparatus according to claim 16, wherein the iterative square-rooting circuit comprises: a first correction term generator for creating a first correction term by means of an (i−2)'th partial square root and the (i−1)'th root digit; a second correction term generator for creating a second correction term by means of an (i−1)'th partial square root; a third correction term generator for creating a third correction term by means of the (i−1)'th partial square root; a first subtractor for deducting the first and second correction terms from a left-shifted value of an (i−2)'th partial remainder; a second subtractor for deducting the first and second correction terms from the left-shifted value of the (i−2)'th partial remainder; a carry propagation detector for checking there is a borrow or a carry-in while calculating an (i−1)'th partial remainder; root digit prediction means for predicting the i'th root digit in response to an (i−1)'th root digit, the (i−2)'th partial remainder, and an output of the carry propagation detector; and selection means for selecting an alternative one of outputs of the first and second subtractors as the i'th partial remainder in response to the i'th root digit.
 20. The apparatus according to claim 19, wherein the second correction term is a conditional correction term when the i'th root digit is +1, and the third correction term is a conditional correction term when the i'th root digit is −1.
 21. The apparatus according to claim 19, wherein the root digit prediction means comprises: a first root prediction block for predicting a first root digit in response to the (i−1)'th root digit and the (i−2)'th partial remainder; a second root prediction block for predicting a second root digit in response to the (i−1)'th root digit and the (i−2)'th partial remainder; and a multiplexer for selecting an alternative one of the first and second root digits as the i'th root digit in response to the output of the carry propagation detector.
 22. A method of providing a square root (q) of a radicand (z), using an iterative operation for a partial remainder involved in x^((i))=4x^((i−2))−(2q^((i−2))+q_(−(i−1))2^(−i+1))q_(−(i−1))−2(2q^((i−1))+q_(−i)2^(−i))q_(−i), where x^((i)) is an i'th partial remainder, x^((i−1)) is an (i−1)'th partial remainder, x^((i−2)) is an (i−2)'th partial remainder, q_(−i) is an I'th root digit, q_(−(i−1)) is an (i−1)'th root digit, q^((i−1)) is an (i−1)'th partial square root, q^((i−2)) is an (i−2)'th partial square root, x⁽⁰⁾=z−1, and q_(−i) ∈ {−1, 0, +1}, the method comprising the steps of; selecting the (i−1)'th root digit from the (i−2)'th partial remainder; detecting a presence of a borrow or a carry-in while calculating an (i−1)'th partial remainder; predicting the i'th root digit with reference to the (i−1)'th root digit, the (i−2)'th partial remainder, and the a presence of the borrow or the carry-in, without calculating the (i−1)'th partial remainder, and calculating the i'th partial remainder by means of the i'th root digit; and repeating the former steps to calculate the square root. 